package com.myz.rabbitmq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @author maoyz0621
 */
@SpringBootApplication
public class RabbitMQOrderApplication extends SpringBootServletInitializer {

    private static final Logger logger = LoggerFactory.getLogger(RabbitMQOrderApplication.class);

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(RabbitMQOrderApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(RabbitMQOrderApplication.class, args);
        try {
            logger.info("RabbitmqOrderApplication start success");
        } catch (Exception e) {
            logger.error("RabbitmqOrderApplication start error:", e);
        }
    }
}
